Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Calculate the translational mode if doesn't exist #1620

Merged
merged 1 commit into from
Jun 14, 2019
Merged

Calculate the translational mode if doesn't exist #1620

merged 1 commit into from
Jun 14, 2019

Conversation

alongd
Copy link
Member

@alongd alongd commented Jun 8, 2019

Motivation or Problem

Arkane determines poor entropies for atoms. The reason is that it appends a translational partition function to modes only if it finds, e.g., 'Molecular mass:' in a Gaussian input file, but that line appears in a freq calculation, not in an sp calculation log file (atoms only have the latter, which is passed to Arkane as the frequency log file as well).
As a result, we get great H298's, but poor S298's:
image
image

Description of Changes

Detect if the translational mode was not appended to the conformer modes, and if so determine it from the mass and append it.
This results in improved S298:
image
image
Much, much better, but could still be improved for O and S (I don't know what the source for the deviation is).

@codecov
Copy link

codecov bot commented Jun 8, 2019

Codecov Report

Merging #1620 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@          Coverage Diff           @@
##           master   #1620   +/-   ##
======================================
  Coverage    41.5%   41.5%           
======================================
  Files         176     176           
  Lines       29306   29306           
  Branches     6033    6033           
======================================
  Hits        12163   12163           
  Misses      16292   16292           
  Partials      851     851

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 9da9be0...4e3c8ff. Read the comment docs.

@alongd alongd requested a review from amarkpayne June 9, 2019 13:59
@alongd
Copy link
Member Author

alongd commented Jun 13, 2019

@cgrambow, can I pick your brain for why we still see discrepancies for O and S's entropy? Any lead?

@cgrambow
Copy link

I haven't looked at your code, but I went ahead and calculated HCSON by hand (see attached file). My results are:

Atom S (J/mol/K)
H 114.72
C 148.99
S 161.24
O 152.57
N 153.30

That's the same as ARC/Arkane gets, it seems (based on your graph), so I think ARC is calculating the partition functions correctly.

That calculation assumes that excited states are inaccessible. The full electronic partition function would be
elec_part
but the assumptions we make simplify it to
elec_simpl
My guess would be that excited states contribute significantly to the entropy for oxygen and sulfur. I checked oxygen on the CCCBDB experimental data page (link), which shows 143.43 J/mol/K for the translational component of the entropy, which is exactly what I calculated in my spreadsheet. However, the electronic contribution is 17.63 J/mol/K, whereas I only calculated 9.13 J/mol/K. If you look at the excited state energies, the first and second excited state of the oxygen atom are extremely close to the ground state (only 158.5 cm-1 and 226.5 cm-1 above the ground state), which explains the difference.

In conclusion, there is no error in Arkane/ARC and we can only do better if we modify the electronic partition function to include excited state energies.

As an aside: @mjohnson541, The primaryThermoLibrary has the incorrect entropy for triplet oxygen atom (36.43 cal/mol/K, which corresponds to my calculation and not the true value, 38.49 or 38.46 cal/mol/K (depending on who you ask), that accounts for excited states). And less important, the group additivity value for triplet sulfur atom is wrong and also seems to coincide with the naively calculated value.

atom_entropies.xlsx

@alongd
Copy link
Member Author

alongd commented Jun 14, 2019

Thanks so much for the detailed response, @cgrambow !!
@amarkpayne, now that the theory seems reasonable, could you take a look at the code?

Sometimes the translational mode is not appended to modes for monoatomic
species. If it doesn't exist, determine it from the mass.
@amarkpayne
Copy link
Member

Can do! I am taking a look at it now.

Copy link
Member

@amarkpayne amarkpayne left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Everything looks good. Colin's explanation also makes sense to me, so I think this is good to go.

@mliu49
Copy link
Contributor

mliu49 commented Jun 14, 2019

Should this be included in the v2.4.0 release?

@alongd
Copy link
Member Author

alongd commented Jun 14, 2019

@mliu49, I think the code review should not take too long, and we do fix a bug here, so YES - we should include it in the release. But I wouldn't want the release to just wait for this PR, if it comes to this then it's also OK to release w/o this.

@mliu49
Copy link
Contributor

mliu49 commented Jun 14, 2019

No problem, we can definitely get it in.

It seems that @amarkpayne already approved this. Is it ready to be merged?

@alongd
Copy link
Member Author

alongd commented Jun 14, 2019

Yes - just waiting on RMG-Tests... (I restarted since it got stuck)

@alongd alongd merged commit 62d3ca2 into master Jun 14, 2019
@alongd alongd deleted the atoms_s branch June 14, 2019 19:24
@mliu49 mliu49 mentioned this pull request Jun 14, 2019
5 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants